package com.web;

import com.pojo.dto.Message;
import com.pojo.vo.CUsedVo;
import com.pojo.vo.SysUserVo;
import com.pojo.vo.UserVo;
import com.service.UserService;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/user/auth")
    public Boolean auth(String username) {
        return userService.auth(username);
    }

    @GetMapping("/user/add")
    public Message<SysUserVo> add(SysUserVo userVo) {
        return userService.add(userVo);
    }
}
